#include<stdio.h>
struct Student
{
    int id;
    int age;
    char *name;
    char *gender;
    char *address;
};//自定义结构体类型

void studifo(struct Student stu)
{
    printf("id:%d\n",stu.id);
    printf("age:%d\n",stu.age);
    printf("name:%s\n",stu.name);
    printf("gender:%s\n",stu.gender);
    printf("adress:%s\n",stu.address);
}

int main()
{
    struct Student stu1,stu2;//自定义的结构体变量
    stu1.id=100;              //4     0
    stu1.age=10;               //4     4
    stu1.name="tom";           //8     8
    stu1.gender="男";          //8      16
    stu1.address="软件园";      //8     24--32
    stu2.name="jerry";          //8（大小）:0（位置）
    stu2.id=100;                //4        8
    stu2.age=10;                //4        12--16
    stu2.gender="男";            //8       16
    stu2.address="软件园";        //8       24--32
    //计算大小
    printf("%ld\n",sizeof(stu1));
    printf("%ld\n",sizeof(stu2));
    return 0;
}